<html>
<head>
	<meta http-equiv="X-UA-Compatible" content="chrome=1" />
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <title>Fit All and Fit Object Test</title>
    <script type="text/javascript" src="../../../../x3dom-include.js"></script>
    <script>
        function fitAll(){
            document.getElementById('x3d').runtime.fitAll();
        }
        function fitBox(){
            document.getElementById('x3d').runtime.fitObject(document.getElementById('Box'));
        }
        function fitSphere(){
            document.getElementById('x3d').runtime.fitObject(document.getElementById('Sphere'));
        }
    </script>
</head>
<body>
    <x3d id='x3d' width='800px' height='600px'>
      <scene DEF='scene'>
          <Viewpoint position="6.87340 12.20044 -0.22922" orientation="-0.85901 0.50378 -0.09113 1.85162"></Viewpoint>
          <background></background>
          <transform id="Box" translation='-2 0 0'>
              <shape>
                  <appearance>
                      <material diffuseColor='0.788 0.188 0.588' shininess='0.0' specularColor='0.0 0.0 0.0'></material>
                   </appearance>
                   <Box></Box>
              </shape>
          </transform>
          <transform translation='2 0 0'>
              <shape id="Sphere">
                  <appearance>
                      <material diffuseColor='0.588 0.588 0.188' shininess='0.0' specularColor='0.0 0.0 0.0'></material>
                  </appearance>
                  <Sphere></Sphere>
              </shape>
          </transform>
      </scene>
    </x3d>
    <input type="button" value="Fit All" onclick="fitAll();">
    <input type="button" value="Fit Box" onclick="fitBox();">
    <input type="button" value="Fit Sphere" onclick="fitSphere();">
  </body>
</html>